package com.sale.goods.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sale.common.mybatis.core.mapper.BaseMapperPlus;
import com.sale.goods.domain.GoodsCancel;
import com.sale.goods.domain.GoodsNuclearPre;
import com.sale.goods.domain.GoodsPayment;
import com.sale.goods.domain.dto.GoodsPaymentDto;
import com.sale.goods.domain.vo.GoodsPaymentVo;
import com.sale.goods.api.dto.GoodsMessageBySupplierDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @Param
 * @Date
 * @Author hl
 **/
public interface GoodsPaymentMapper extends BaseMapperPlus<GoodsPaymentMapper, GoodsPayment, GoodsPayment> {

    /**
     * 付款单查询列表 分页
     * @param build,buildQueryWrapper
     * @return   List<GoodsPaymentDto>
     */
    Page<GoodsPaymentDto> selectPaymentList(@Param("page") Page<GoodsPaymentVo> build,@Param(Constants.WRAPPER) Wrapper<GoodsPaymentVo> buildQueryWrapper);

    /**
     * 工作台接口(销售已收款金额)
     */
    String goodsReceived();

    /**
     * 工作台接口(采购未付款金额)
     */
    String goodsArrears();

    /**
     * 根据供应商分组获取已核销金额、整单折扣
     */
    List<GoodsMessageBySupplierDto> getGoodsMessageBySupplier();

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsPaymentDto> getQClosingDocument(String time);

    /**
     * 结账反结账（财务模块单据查询）
     */
    List<GoodsPaymentDto> getRClosingDocument(String time);

    /**
     * 更新核销
     */
    void paymentAndCancellation(GoodsCancel cancel);

    void updatePaymentCancel(GoodsCancel ca);
}
